<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // filter(function(item,index,o))
      // item代表元素的值
      // index代表元素的索引
      // o代表被遍历的数组本身
      // 遍历数组，筛选所有满足条件的元素，并返回一个新数组
      const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
      const arr1 = arr.filter((item, index, o) => item > 5)
      console.log(arr1)
    </script>
  </body>
</html>
